#ifndef BARVIEW_H
#define BARVIEW_H

#include <QGraphicsView>
#include "commondef.h"
class QTimeLine;
class QGraphicsItemAnimation;
class barview : public QGraphicsView
{
    Q_OBJECT
public:
    explicit barview(QWidget *parent = 0);
    ~barview();
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

public:
    QGraphicsScene                          *m_Scene;
    QList<QGraphicsPixmapItem*>             m_ItemList;
    int                                     m_startX;
    QGraphicsItem *                         m_selectitem;
    QTimeLine*                              m_timeline;
    QList<QGraphicsItemAnimation*>          m_animationlist;
    bool                                    m_bsupportmove;
    QGraphicsPixmapItem*                    m_ShadowItem;
    QGraphicsPixmapItem*                    m_bgItem;
    bool                                    m_bmove;
signals:
    void select(int isel);
};
///////////////////////////////////////PaperBar
class PaperBar:public barview
{
public:
    PaperBar(QWidget *parent = 0);
public:
};
//////////////////////////////////////MenuBar
class MenuBar:public barview
{
public:
    MenuBar(QWidget *parent = 0);
};
//////////////////////////////////////PaintBar
class PaintBar:public barview
{
public:
    PaintBar(QWidget *parent = 0);
};
//////////////////////////////////////CrayonsBar
class CrayonsBar:public barview
{
public:
    CrayonsBar(QWidget *parent = 0);
};
//////////////////////////////////////PencilBar
class PencilBar:public barview
{
public:
    PencilBar(QWidget *parent = 0);
};
///////////////////////////////////////StampsBar
class StampsBar:public barview
{
public:
    StampsBar(QWidget *parent = 0);
};
///////////////////////////////////////StickerBar
class StickerBar:public barview
{
public:
    StickerBar(QWidget *parent = 0);
};

#endif // BARVIEW_H
